package com.demo2do.fms.queue.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.demo2do.fms.entity.driver.Driver;
import com.demo2do.fms.entity.driver.DriverAuditStatus;

/**
 *
 * @author Ark
 *
 */
@Dao("hibernate")
public interface DriverDao {

    /**
     * @param vehicleId
     * @param status
     * @return
     */
    @Query("FROM Driver WHERE disabled = false AND vehicleId = :vehicleId AND status = :status")
    public List<Driver> listByVehicle(@Variable("vehicleId") Long vehicleId, @Variable("status") DriverAuditStatus status);
    
}
